import Vue from 'vue';
import Vuex from 'vuex';
import login from './login.js'
Vue.use(Vuex);

export default new Vuex.Store({
    state: {
        menuFlag:true,
        userAdmin:sessionStorage.getItem('userAdmin'),
        navActive: sessionStorage.getItem('navActive') ,
    },
    getters: {
    },
    mutations:{
        setUserAdmin(state, value){
            state.userAdmin = value
        },
        setMenu(state,value){
            state.menuFlag = !state.menuFlag
        },
        setNavActive(state, value) {
            state.navActive = value;
            sessionStorage.setItem('navActive', value)
        }
    },
    actions:{

    },
    modules:{login},
})
